from Base import Base
from selenium.webdriver.common.by import By


class Page3(Base):
    btn_loc = (By.XPATH, '/html/body/div[1]/div/section/section/main/div[1]/form/div[1]/div/div/div/button/span')

    def btn(self):
        self.click(self.btn_loc)

    book_name_loc = (By.XPATH, '/html/body/div[1]/div/section/section/main/form/div[1]/div/div/div/input')

    def book_name(self):
        self.send_keys(self.book_name_loc, '123456')

    book_actor_loc = (By.XPATH, '/html/body/div[1]/div/section/section/main/form/div[2]/div/div/div/input')

    def book_actor(self):
        self.send_keys(self.book_actor_loc, '123')

    book_isbn_loc = (By.XPATH, '/html/body/div[1]/div/section/section/main/form/div[3]/div/div/div/input')

    def book_isbn(self):
        self.send_keys(self.book_isbn_loc, '1')

    ook_p_loc = (By.XPATH, '/html/body/div[1]/div/section/section/main/form/div[4]/div/div/div/input')

    def book_p(self):
        self.send_keys(self.ook_p_loc, '1')

    book_p2_loc = (By.XPATH, '/html/body/div[1]/div/section/section/main/form/div[5]/div/div/div/input')

    def book_p2(self):
        self.send_keys(self.book_p2_loc, '1')

    book_fen_loc = (By.XPATH, '/html/body/div[1]/div/section/section/main/form/div[6]/div/div/div/input')

    def book_fen(self):
        self.send_keys(self.book_fen_loc, '1')

    tijiao_loc = (By.XPATH, '/html/body/div[1]/div/section/section/main/form/div[7]/div/button[1]/span')

    def tj(self):
        self.click(self.tijiao_loc)

    def tj_lj3(self):
        self.btn()
        self.book_name()
        self.book_actor()
        self.book_isbn()
        self.book_p()
        self.book_p2()
        self.book_fen()
        self.tj()
